import request from '@/utils/request'

export function listSelect() {
    return request({
        url: '/app-api/business/gateway/list/select',
        method: 'get'
    })
}

/**
 * 网关管理表格获取数据
 */
export function listGateway(query) {
    return request({
        url: '/app-api/business/gateway/list',
        method: 'get',
        params: query
    })
}

export function getGateway(gatewayId) {
    console.log(gatewayId)
    return request({
        url: '/app-api/business/gateway/getGatewayInfo',
        method: 'get',
        params: {
            gatewayId: gatewayId
        }
    })
}

export function addGateway(data) {
    return request({
        url: '/app-api/business/gateway',
        method: 'post',
        data: data
    })
}

export function updateGateway(data) {
    return request({
        url: '/app-api/business/gateway',
        method: 'put',
        data: data
    })
}

export function delGateway(gatewayId) {
    return request({
        url: '/app-api/business/gateway/' + gatewayId,
        method: 'delete'
    })
}
